<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='zsgwk'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <script src="${web_domain}/resources/dist-picker/distpicker.min.js"></script>
    <style>
        html {
            background: #fff;
        }

        .layui-form-item .layui-input-inline {
            width: 350px;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form method="POST" class="layui-form" id="present">

            <div class="layui-form-item">
                <label class="layui-form-label"><fmt:message key='yhsjhm'/></label>
                <div class="layui-input-inline" style="width: 400px">
                    <select name="userId" lay-search>
                        <option value=""><fmt:message key='qsrsjhm'/></option>
                        <c:forEach var="item" items="${users}">
                            <option value="${item.id}">${item.mobile}</option>
                        </c:forEach>
                    </select>
                </div>
            </div>

            <div style="display: none">
                <input type="button" id="submit" value="<fmt:message key='tj'/>">
            </div>
        </form>
    </div>
</div>


<script type="text/javascript" src="${web_domain}/resources/plugins/region2.0.js"></script>
<script>


    layui.use(['layer', 'form'], function () {
        var layer = layui.layer;

        $("#submit").click(function() {
            $("#present").ajaxSubmit({
                success: function(res) {
                    if (res.status) {
                        layer.alert("<fmt:message key='zscg'/>", function (){
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                            parent.$("#search").click();
                        });
                    } else {
                        layer.alert(res.message);
                    }
                }
            })
        });
    });

</script>
</body>
</fmt:bundle>
</html>